// card.cpp – implementation of the class Card
#include <iostream>
#include <string>
#include "card.h"

using namespace std;

// A default constructor
Card::Card() {
	value = 0;
	suit = "";
}

// A regular constructor
Card::Card(int value1, string suit1) {
	value = value1;
	suit = suit1;
}

// A copy constructor
Card::Card(Card& c) {
	// You don’t need to do anything here unless you used char* for "suit"
	// You can also put
	// value = c.value;
	// suit = c.suit;
}

// A destructor
Card::~Card() {
	// Do nothing. However, if you used char* to specify "suit", then you need to delete "suit"
}

// Modifies the suit
void Card::setSuit(string suit1) {
	suit = suit1;
}

// Returns the suit
string Card::getSuit() const {
	return suit;
}

// Returns the card value.
int Card::getValue()  const {
	return value;
}		

// Displays information about the card
void Card::print() const {
	if (value == 1)   cout << "Ace";
	else if (value == 11) cout << "Jack";
	else if (value == 12) cout << "Queen";
	else if (value == 13) cout << "King";
	else cout << value;
	cout << "-" << suit << endl;
}
